package com.bite.mvcdemo.controller;


import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hello")
public class HelloController {
    @RequestMapping(value = "/v1")
    public String v1(){
        return "hello v1";
    }
    //@GetMapping 只支持get请求
    @GetMapping("/v2")
    public String v2(){
        return "hello v2";
    }

    @RequestMapping(value = "/v3", method = RequestMethod.POST)
    public String v3(){
        return "hello v3";
    }
    //@PostMapping 只支持post请求
    @PostMapping("/v4")
    public String v4(){
        return "hello v4";
    }

}
